import pymysql

client = pymysql.connect(
    host='localhost',
    user='root',
    password='123456',
    db='hugo',
    port=3306,
    charset='utf8'
)
# cursor = client.cursor()
cursor = client.cursor(pymysql.cursors.DictCursor)
sql = 'select * from user'
rows = cursor.execute(sql)
print(rows)
# res = cursor.fetchall()
# print(res)
# res = cursor.fetchall()
# res = cursor.fetchone()
# print(res)
# res = cursor.fetchone()
# print(res)
# res = cursor.fetchone()
# print(res)
# res = cursor.fetchmany()
# print(res)
# res = cursor.fetchmany()
# print(res)
# res = cursor.fetchmany()
# print(res)
# print(cursor.fetchone())
# print(cursor.scroll(0, mode="absolute"))

# res = cursor.fetchone()
# print(res)
# cursor.scroll(1,mode='relative')
# res1 = cursor.fetchone()
# print(res1)
# cursor.scroll(0,mode='absolute')
# res2 = cursor.fetchall()
# print(res2)
# cursor.scroll(1,mode='absolute')
# res3 = cursor.fetchall()
# # print(res3)
# print(cursor.fetchall())
# cursor.scroll(0,mode='absolute')
# print(cursor.fetchone())
# cursor.scroll(1,mode='relative')
# print(cursor.fetchone())
# print(cursor.fetchall())
# cursor.scroll(0,mode='absolute')
# print(cursor.fetchone())
# cursor.scroll(1,mode='relative')
# print(cursor.fetchone())
# print(cursor.fetchall())
# cursor.scroll(0,mode='absolute')
# print(cursor.fetchone())
# cursor.scroll(1,mode='relative')
# print(cursor.fetchone())
# print(cursor.fetchall())
# cursor.scroll(0,mode='absolute')
# print(cursor.fetchone())
# cursor.scroll(1,mode='relative')
# print(cursor.fetchone())
# print(cursor.fetchall())
# cursor.scroll(0,mode='absolute')
# print(cursor.fetchone())
# cursor.scroll(1,mode='relative')
# print(cursor.fetchone())
# print(cursor.fetchall())
# cursor.scroll(0,mode='absolute')
# print(cursor.fetchone())
# cursor.scroll(1,mode='relative')
# print(cursor.fetchone())
#
# print(cursor.fetchall())
# cursor.scroll(0,mode='absolute')
# print(cursor.fetchone())
# cursor.scroll(1,mode='relative')
# print(cursor.fetchone())
# print(cursor.fetchall())
# cursor.scroll(0,mode='absolute')
# print(cursor.fetchone())
# cursor.scroll(1,mode='relative')
# print(cursor.fetchone())
# print(cursor.fetchall())
# cursor.scroll(0,mode='absolute')
# print(cursor.fetchone())
# cursor.scroll(1,mode='relative')
# print(cursor.fetchone())
# print(cursor.fetchall())
# cursor.scroll(0,mode='absolute')
# print(cursor.fetchone())
# cursor.scroll(1,mode='relative')
# print(cursor.fetchone())

# print(cursor.fetchall())
# cursor.scroll(0,mode='absolute')
# print(cursor.fetchone())
# cursor.scroll(1,mode='relative')
# print(cursor.fetchone())



































































cursor.close()
client.close()